package TG_1431;

import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

public class Solution {
	public List<Boolean> kidsWithCandies(int[] candies, int extraCandies) {
		int max = getmax(candies);
		List<Boolean> res = new LinkedList<Boolean>();
		for (int i = 0; i < candies.length; i++) {
			int temp = candies[i] + extraCandies;
			res.add(candies[i] >= max);
		}

		return res;
	}

	private int getmax(int[] candies) {
		int max = -1;
		for (int i : candies) {
			max = Math.max(max, i);
		}
		return max;
	}
}
